package cn.zl.GB28181.transmit.cmd;

import cn.zl.GB28181.core.SSRCInfo;
import cn.zl.GB28181.event.core.SipSubscribeEvent;
import cn.zl.model.Device;
import cn.zl.model.DeviceChannel;

import javax.sip.InvalidArgumentException;
import javax.sip.SipException;
import java.text.ParseException;

public interface ISIPCommander {

    /**
     * 查询设备信息
     *
     * @param device 视频设备
     */
    void deviceInfoQuery(Device device) throws InvalidArgumentException, SipException, ParseException;

    /**
     * 查询目录列表
     *
     * @param device 视频设备
     */
    void catalogQuery(Device device, int sn, SipSubscribeEvent errorEvent) throws SipException, InvalidArgumentException, ParseException;

    /**
     * 请求预览视频流
     * @param device  视频设备
     * @param channel  预览通道
     */
    void playStreamCmd(SSRCInfo ssrcInfo, Device device, DeviceChannel channel, SipSubscribeEvent okEvent, SipSubscribeEvent errorEvent) throws InvalidArgumentException, SipException, ParseException;

    /**
     * 视频流停止, 不使用回调
     */
    void streamByeCmd(Device device, String channelId, String stream, String callId) throws InvalidArgumentException, ParseException, SipException;

    /**
     * 视频流停止
     * */
    void streamByeCmd(Device device, String channelId, String stream, String callId, SipSubscribeEvent okEvent) throws InvalidArgumentException, SipException, ParseException;

}
